mvProj(){
	local p=$1
	#拷贝工程到teksun目录
	rm -rf ../teksun/${p}
	mkdir -p ../teksun/${p} 
	#find . -iname ${p} -type d | grep -v "./out" | xargs -I [] cp -rf --parent [] ../teksun/${p}/ 
	#find . -iname ${p} | grep -v "out" | xargs -I [] cp -rf --parent [] ../teksun/${p}/ 
	#find . -iname "*${p}*" ! -path "./out/*" ! -path "./pack_out/*" -exec  cp -rf --parent {} ../teksun/${p}/ ';'
	#find . -iname "*${p}.*" -type f -o -iname "${p}" -type d ! -path "./out/*" ! -path "./pack_out/*" -exec  cp -rf --parent {} ../teksun/${p}/ ';'
	find . -iname "*${p}.*" -type f -o -iname "${p}" -type d ! -path "./out/*" ! -path "./pack_out/*" |xargs -I []  cp -rf --parent [] ../teksun/${p}/ 
	#cp -rf --parents vendor/mediatek/proprietary/trustzone/custom/build/project/${p}.mk ../teksun/${p}/
	#cp -rf --parents vendor/mediatek/proprietary/bootable/bootloader/lk/project/${p}.mk ../teksun/${p}/
	#if [ "$(grep MTK_K64_SUPPORT device/teksun/${p}/ProjectConfig.mk | awk -F'=' '{print$2}' | sed s#[[:space:]]##g)" != yes ];then
	#	arm_type=arm
	#else
	#	arm_type=arm64
	#fi
	#cp -rf --parents kernel-3.18/arch/${arm_type}/boot/dts/${p}.dts ../teksun/${p}/
	#cp -rf --parents kernel-3.18/arch/${arm_type}/configs/${p}_debug_defconfig  ../teksun/${p}/
	#cp -rf --parents kernel-3.18/arch/${arm_type}/configs/${p}_defconfig  ../teksun/${p}/
	#cp -rf --parents vendor/teksun/libs/${p}/ ../teksun/${p}/
	#在teksun目录做提交
	pushd .
	cd ../teksun/${p}
	find . -type f | grep -v "./file" > file
	sed -i 's#.*#AA &#g' file
	git add -A
	git commit -m "${p}:新建工程"
	popd

	#删除旧工程
	#find . -iname "*${p}.*" -type f -o -iname "${p}" -type d ! -path "./out/*" ! -path "./pack_out/*" -exec rm -rf {} ';'
	find . -iname "*${p}.*" -type f -o -iname "${p}" -type d ! -path "./out/*" ! -path "./pack_out/*" |xargs -I [] rm -rf []
	#find . -iname ${p} | grep -v "./out" | xargs rm -rf 
	#rm -rf vendor/mediatek/proprietary/trustzone/custom/build/project/${p}.mk
	#rm -rf vendor/mediatek/proprietary/bootable/bootloader/lk/project/${p}.mk 
	#rm -rf kernel-3.18/arch/${arm_type}/boot/dts/${p}.dts 
	#rm -rf kernel-3.18/arch/${arm_type}/configs/${p}_debug_defconfig  
	#rm -rf kernel-3.18/arch/${arm_type}/configs/${p}_defconfig  
	#rm -rf vendor/teksun/libs/${p}
	git add -A
	git commit -m "${p}:删除工程"
	
	#更新客制化文件
	~/workspace/shell/xunhuBuild/model.sh -p ${p}
	~/workspace/shell/xunhuBuild/cpBase.sh ${p} alibaba
	~/workspace/shell/xunhuBuild/model.sh -s ${p}
	pushd .
	cd ../teksun/${p}
	#cd ../teksun
	git add -A
	git commit -m "${p}:客制化修改"
	#cd ..
	#~/workspace/shell/xunhuBuild/model.sh --commit $($(which git) log --oneline -1 --format="%h")
	popd

}


mvProj $1




	


